Page({
  data: {
    point: '',
    size: 1,
    type: ''
  },
  onLoad ({ point }) {
    this.fake(point)
  },
  // 造假数据渲染
  fake (point) {
    // 伪造的有楼号   还有叫的名称  '栋' 或者 '号楼'
    const size = Math.floor(Math.random() * 4) + 3
    const type = size > 4 ? '号楼' : '栋'
    this.setData({ point, size, type })
    console.log(point + size + type)
  },
  // 跳转到选择房间页
  goRoom (e) {
    wx.navigateTo({
      url: `/house_pkg/pages/room/index?point=${this.data.point}&building=${e.mark.building}`
    })
  }
})